<template>
  <div class="content">
    <h2 class="title">热门精选</h2>
    <div class="list">
      <template v-for="(item, index) in houseLists" :key="item.data.houseId">
        <house-type-v3
          v-if="item.discoveryContentType === 3"
          :item-data="item.data"
        ></house-type-v3>
        <houseTypeV9
          v-else-if="item.discoveryContentType === 9"
          :item-data="item.data"
        ></houseTypeV9>
      </template>
    </div>
  </div>
</template>

<script setup>
import houseTypeV9 from "@/components/house-type-v9/house-type-v9.vue";
import houseTypeV3 from "@/components/house-type-v3/house-type-v3.vue";
import useHomeStore from "@/stores/modules/home";
import { storeToRefs } from "pinia";

const homeStore = useHomeStore();
const { houseLists } = storeToRefs(homeStore);
</script>

<style lang="less" scoped>
.content {
  padding: 10px 8px;
  .title {
    font-size: 22px;
    padding: 10px;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
  }
}
</style>
